<template>
  <div style="margin-left: 50px;margin-top: 50px">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="姓名">
        <el-input v-model="form.name" style="width: 200px;" placeholder="请输入姓名" />
      </el-form-item>
      <el-form-item label="性别">
        <el-radio v-model="form.sex" label="男">男</el-radio>
        <el-radio v-model="form.sex" label="女">女</el-radio>
      </el-form-item>
      <el-form-item label="手机号码">
        <el-input v-model="form.phone" style="width: 300px;" placeholder="请输入电话" />
      </el-form-item>
      <el-form-item label="身份证号">
        <el-input v-model="form.card" style="width: 300px;" placeholder="请输入身份证" />
      </el-form-item>
      <el-form-item label="家庭住址">
        <el-input v-model="form.address" style="width: 300px;" placeholder="请输入家庭地址" />
      </el-form-item>
      <el-form-item label="体温">
        <el-input v-model="form.temperature" style="width: 100px;" placeholder="输入体温" />
      </el-form-item>
      <el-form-item label="绿码">
        <el-radio v-model="form.isDanger" label="ok">有绿码</el-radio>
        <el-radio v-model="form.isDanger" label="notok">无绿码</el-radio>
      </el-form-item>
      <el-form-item label="来访事由">
        <el-input v-model="form.reason" style="width: 200px;" placeholder="请输入来访原因" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">提交</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'Index',
  data() {
    return {
      form: {
        name: '',
        sex: '',
        phone: '',
        card: '',
        address: '',
        temperature: [],
        isDanger: '',
        reason: ''
      }
    }
  },
  methods: {
    onSubmit() {
      console.log('submit!')
    }
  }
}
</script>

<style scoped>
</style>
